home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / Mesa-3.0 / SRC / MGL / MMESAP.H < prev   
Encoding:
C/C++ Source or Header  |  1998-07-06  |  17.5 KB  |  348 lines

  1. /****************************************************************************
  2. *
  3. *                        Mesa bindings for SciTech MGL
  4. *
  5. *               Copyright (C) 1996-1998 SciTech Software, Inc.
  6. *                            All rights reserved.
  7. *
  8. * Language:     ANSI C
  9. * Environment:    Any
  10. *
  11. * Description:    Internal header file for the Mesa/OpenGL interface bindings
  12. *                for the SciTech MGL graphics library. 
  13. *
  14. * This library is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU Library General Public
  16. * License as published by the Free Software Foundation; either
  17. * version 2 of the License, or (at your option) any later version.
  18. *
  19. * This library is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  22. * Library General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Library General Public
  25. * License along with this library; if not, write to the Free
  26. * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27. *
  28. ****************************************************************************/
  29.  
  30. #ifndef    __MMESAP_H
  31. #define    __MMESAP_H
  32.  
  33. #include "context.h"
  34. #include "mgl_int.h"
  35. #include "matrix.h"
  36. #include "types.h"
  37. #include "vb.h"
  38. #include "mgl/halftone.h"
  39.  
  40. /*---------------------- Macros and type definitions ----------------------*/
  41.  
  42. /* Internal Mesa rendering context */
  43.  
  44. struct MGLMesaContext {
  45.     GLcontext        *gl_ctx;            /* the core Mesa context         */
  46.     GLvisual        *gl_vis;            /* describes the color buffer     */
  47.     GLframebuffer    *gl_buffer;            /* the ancillary buffers         */
  48.     MGLDC            *dc;                /* Rendering DC                    */
  49.     MGLDC            *dispdc;            /* Display DC                    */
  50.     MGLDC            *memdc;                /* Memory DC back buffer        */
  51.     color_t            clearColor;            /* Color to clear device with    */
  52.     color_t            color;                /* Current color                */
  53.     uchar            red,green,blue;        /* RGB components for color        */
  54.     int                bottom;                /* Bottom coordinate for buffer    */
  55.     int                bufferMode;            /* Current buffer access mode    */
  56.     int                frontbuffer;        /* Page index of front buffer    */
  57.     int                backbuffer;            /* Page index of back buffer    */
  58.     uint             pixelformat;        /* Current pixel format         */
  59.     uint             undithered_pf;        /* Undithered pixel format        */
  60.     uint             dithered_pf;        /* Dithered pixel format        */
  61.     };
  62.  
  63. /* Macros for MGL API callbacks when running in a DLL for Windows */
  64.  
  65. #ifdef    __WINDOWS__
  66. #define MGL_makeCurrentDC(dc)                                                _MGL_callbacks.makeCurrentDC(dc)
  67. #define    MGL_clearCurrentDC()                                                _MGL_callbacks.makeCurrentDC(NULL)
  68. #define MGL_setActivePage(dc,page)                                            _MGL_callbacks.setActivePage(dc,page)
  69. #define MGL_setVisualPage(dc,page,waitVRT)                                    _MGL_callbacks.setVisualPage(dc,page,waitVRT)
  70. #define MGL_surfaceAccessType(dc)                                            _MGL_callbacks.surfaceAccessType(dc)
  71. #define MGL_isDisplayDC(dc)                                                 _MGL_callbacks.isDisplayDC(dc)
  72. #define MGL_isWindowedDC(dc)                                                _MGL_callbacks.isWindowedDC(dc)
  73. #define MGL_isMemoryDC(dc)                                                  _MGL_callbacks.isMemoryDC(dc)
  74. #define MGL_createMemoryDC(xSize,ySize,bitsPerPixel,pf)                     _MGL_callbacks.createMemoryDC(xSize,ySize,bitsPerPixel,pf)
  75. #define MGL_destroyDC(dc)                                                   _MGL_callbacks.destroyDC(dc)
  76. #define MGL_bitBltCoord(dst,src,left,top,right,bottom,dstLeft,dstTop,op)    _MGL_callbacks.bitBltCoord(dst,src,left,top,right,bottom,dstLeft,dstTop,op)
  77. #define MGL_setPaletteEntry(dc,entry,red,green,blue)                        _MGL_callbacks.setPaletteEntry(dc,entry,red,green,blue)
  78. #define MGL_setPalette(dc,pal,numColors,startIndex)                         _MGL_callbacks.setPalette(dc,pal,numColors,startIndex)
  79. #define MGL_getPalette(dc,pal,numColors,startIndex)                         _MGL_callbacks.getPalette(dc,pal,numColors,startIndex)
  80. #define MGL_realizePalette(dc,numColors,startIndex,waitVRT)                 _MGL_callbacks.realizePalette(dc,numColors,startIndex,waitVRT)
  81. #else
  82. #define    MGL_clearCurrentDC()                                                MGL_makeCurrentDC(NULL);
  83. #endif
  84.  
  85. /* Converts a GL window Y coord to an X window Y coord */
  86.  
  87. #define FLIP(Y)  (RC.bottom - (Y))
  88.  
  89. /* Values for RC.pixelformat */
  90.  
  91. #define PF_INDEX        1        /* Color Index mode                     */
  92. #define    PF_RGB8            2        /* 8bpp RGB without dithering            */
  93. #define    PF_DITHER8        3        /* 8bpp RGB dithered                    */
  94. #define    PF_RGB555        4        /* 15bpp RGB without dithering            */
  95. #define    PF_DITHER555    5        /* 15bpp RGB dithered                    */
  96. #define    PF_RGB565        6       /* 16bpp RGB without dithering            */
  97. #define    PF_DITHER565    7        /* 16bpp RGB dithered                    */
  98. #define    PF_RGB888        8        /* 24bpp RGB TrueColor                    */
  99. #define    PF_BGR888        9       /* 24bpp BGR TrueColor                    */
  100. #define    PF_ARGB8888        10        /* 32bpp ARGB TrueColor                    */
  101. #define    PF_ABGR8888        11         /* 32bpp ABGR TrueColor                    */
  102. #define    PF_RGBA8888        12        /* 32bpp RGBA TrueColor                    */
  103. #define    PF_BGRA8888        13        /* 32bpp BGRA TrueColor                    */
  104.  
  105. /* Macros to directly access the software z-buffer */
  106.  
  107. #define    ZBUF_ADDR(x,y)                                            \
  108.     ((GLdepth _HUGE*)(RC.dc->zbuffer)                            \
  109.         + (((y) - RC.dc->size.top) * (long)RC.dc->zwidth)        \
  110.         + (x) - RC.dc->size.left)
  111.  
  112. /* Macros for 8bpp direct surface access */
  113.  
  114. #define    PACKED8_pixelAddr(x,y)    \
  115.      ((void*)((uchar*)RC.dc->surface + ((long)y * MI.bytesPerLine) + x))
  116.  
  117. #define    PACK_COLOR_8(R,G,B)                                        \
  118.     (uchar)(20 + _MGL_div51[R] + _MGL_mul6[_MGL_div51[G]] +        \
  119.           _MGL_mul36[_MGL_div51[B]])
  120.  
  121. /* Macros for 16bpp direct surface access */
  122.  
  123. #define    PACKED16_pixelAddr(x,y)    \
  124.      ((void*)((uchar*)RC.dc->surface + ((long)y * MI.bytesPerLine) + x*2))
  125.  
  126. #define    PACK_COLOR_555(R,G,B)                \
  127.     (ushort)( (((ulong)(R) & 0xF8) << 7)     \
  128.             | (((ulong)(G) & 0xF8) << 3)     \
  129.             | (((ulong)(B) & 0xF8) >> 3))
  130.  
  131. #define    PACK_COLOR_565(R,G,B)                \
  132.     (ushort)( (((ulong)(R) & 0xF8) << 8)    \
  133.             | (((ulong)(G) & 0xFC) << 3)    \
  134.             | (((ulong)(B) & 0xF8) >> 3))
  135.  
  136. //#define PACK_5R6G5B( R, G, B)     ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
  137.  
  138. #define    UNPACK_COLOR_555(c,R,G,B)                    \
  139. {                                                    \
  140.  (R) = (uchar)(((ulong)(c) >> 7) & 0xF8);            \
  141.  (G) = (uchar)(((ulong)(c) >> 3) & 0xF8);            \
  142.  (B) = (uchar)(((ulong)(c) << 3) & 0xF8);            \
  143. }
  144.  
  145. #define    UNPACK_COLOR_565(c,R,G,B)                    \
  146. {                                                    \
  147.  (R) = (uchar)(((ulong)(c) >> 8) & 0xF8);            \
  148.  (G) = (uchar)(((ulong)(c) >> 3) & 0xFC);            \
  149.  (B) = (uchar)(((ulong)(c) << 3) & 0xF8);            \
  150. }
  151.  
  152. /* Macros for 24bpp direct surface access */
  153.  
  154. #define    PACKED24_pixelAddr(x,y)    \
  155.      ((void*)((uchar*)RC.dc->surface + ((long)y * MI.bytesPerLine) + x*3))
  156.  
  157. #define    PACK_COLOR_RGB(R,G,B)        \
  158.     ( (ulong)(R)  << 16)            \
  159.     | ((ulong)(G) << 8)                \
  160.     | ((ulong)(B) << 0)
  161.  
  162. #define    PACK_COLOR_BGR(R,G,B)        \
  163.     ( (ulong)(R)  << 0)                \
  164.     | ((ulong)(G) << 8)                \
  165.     | ((ulong)(B) << 16)
  166.  
  167. #define    UNPACK_COLOR_RGB(c,R,G,B)                    \
  168. {                                                    \
  169.  (R) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  170.  (G) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  171.  (B) = (uchar)(((ulong)(c) >> 0) & 0xFF);            \
  172. }
  173.  
  174. #define    UNPACK_COLOR_BGR(c,R,G,B)                    \
  175. {                                                    \
  176.  (R) = (uchar)(((ulong)(c) >> 0) & 0xFF);            \
  177.  (G) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  178.  (B) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  179. }
  180.  
  181. /* Macros for 32bpp direct surface access */
  182.  
  183. #define    PACKED32_pixelAddr(x,y)    \
  184.      ((void*)((uchar*)RC.dc->surface + ((long)y * MI.bytesPerLine) + x*4))
  185.  
  186. #define    PACK_COLOR_ARGB(R,G,B)        \
  187.     ( (ulong)(R) << 16)                \
  188.     | ((ulong)(G) << 8)                \
  189.     | ((ulong)(B) << 0)
  190.  
  191. #define    PACK_COLOR_ABGR(R,G,B)        \
  192.     ( (ulong)(R) << 0)                \
  193.     | ((ulong)(G) << 8)                \
  194.     | ((ulong)(B) << 16)
  195.  
  196. #define    PACK_COLOR_RGBA(R,G,B)        \
  197.     ( (ulong)(R) << 24)                \
  198.     | ((ulong)(G) << 16)            \
  199.     | ((ulong)(B) << 8)
  200.  
  201. #define    PACK_COLOR_BGRA(R,G,B)        \
  202.     ( (ulong)(R) << 8)                \
  203.     | ((ulong)(G) << 16)            \
  204.     | ((ulong)(B) << 24)
  205.  
  206. #define    UNPACK_COLOR_ARGB(c,R,G,B)                    \
  207. {                                                    \
  208.  (R) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  209.  (G) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  210.  (B) = (uchar)(((ulong)(c) >> 0) & 0xFF);            \
  211. }
  212.  
  213. #define    UNPACK_COLOR_ABGR(c,R,G,B)                    \
  214. {                                                    \
  215.  (R) = (uchar)(((ulong)(c) >> 0) & 0xFF);            \
  216.  (G) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  217.  (B) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  218. }
  219.  
  220. #define    UNPACK_COLOR_RGBA(c,R,G,B)                    \
  221. {                                                    \
  222.  (R) = (uchar)(((ulong)(c) >> 24) & 0xFF);            \
  223.  (G) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  224.  (B) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  225. }
  226.  
  227. #define    UNPACK_COLOR_BGRA(c,R,G,B)                    \
  228. {                                                    \
  229.  (R) = (uchar)(((ulong)(c) >> 8) & 0xFF);            \
  230.  (G) = (uchar)(((ulong)(c) >> 16) & 0xFF);            \
  231.  (B) = (uchar)(((ulong)(c) >> 24) & 0xFF);            \
  232. }
  233.  
  234. /*--------------------------- Global Variables ----------------------------*/
  235.  
  236. #define    RC        _MM_rc
  237. #define    MI        _MGL_mi
  238. #define    PF        _MGL_pf
  239. #define    VECS    _MGL_vecs
  240. extern MGLRC            _MM_rc;            /* Current rendering context    */
  241. extern MGLRC            *_MM_rcPtr;        /* Pointer to current context    */
  242. extern gmode_t            _MGL_mi;        /* MGL mode information            */
  243. extern pixel_format_t    _MGL_pf;        /* MGL mode pixel format        */
  244. extern vecs                _MGL_vecs;        /* MGL Rendering vectors         */
  245.  
  246. /*------------------------- Function Prototypes ---------------------------*/
  247.  
  248. /* General functions */
  249.  
  250. static void setup_DD_pointers(GLcontext *ctx);
  251. points_func mmesa_get_points_func(GLcontext *ctx);
  252. line_func mmesa_get_line_func(GLcontext *ctx);
  253. triangle_func mmesa_get_triangle_func(GLcontext *ctx);
  254. quad_func mmesa_get_quad_func(GLcontext *ctx);
  255. rect_func mmesa_get_rect_func(GLcontext *ctx);
  256.  
  257. /* 8bpp rendering functions */
  258.  
  259. void _mmesa_write_span_ci(GLcontext *ctx,GLuint n,GLint x,GLint y,GLuint index[],GLubyte mask[]);
  260. void _mmesa_write_span_ci8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte index[],GLubyte mask[]);
  261. void _mmesa_write_span_8_8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  262. void _mmesa_write_span_8_DITHER8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  263. void _mmesa_write_span_rgb_8_8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  264. void _mmesa_write_span_rgb_8_DITHER8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  265. void _mmesa_write_span_mono_ci(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  266. void _mmesa_write_span_mono_8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  267. void _mmesa_write_span_mono_8_DITHER8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  268. void _mmesa_write_pixels_ci(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLuint index[],GLubyte mask[]);
  269. void _mmesa_write_pixels_8_8(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  270. void _mmesa_write_pixels_8_DITHER8(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  271. void _mmesa_write_pixels_mono_ci(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  272. void _mmesa_write_pixels_mono_8(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  273. void _mmesa_write_pixels_mono_8_DITHER8(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  274. void _mmesa_read_span_ci(GLcontext *ctx,GLuint n,GLint x,GLint y,GLuint index[]);
  275. void _mmesa_read_span_8_8(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  276. void _mmesa_read_pixels_ci(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLuint indx[],GLubyte mask[]);
  277. void _mmesa_read_pixels_8_8(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  278.  
  279. /* 15/16bpp rendering functions */
  280.  
  281. void _mmesa_write_span_16_555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  282. void _mmesa_write_span_16_565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  283. void _mmesa_write_span_16_DITHER555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  284. void _mmesa_write_span_16_DITHER565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  285. void _mmesa_write_span_rgb_16_555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  286. void _mmesa_write_span_rgb_16_565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  287. void _mmesa_write_span_rgb_16_DITHER555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  288. void _mmesa_write_span_rgb_16_DITHER565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  289. void _mmesa_write_span_mono_16(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  290. void _mmesa_write_span_mono_16_DITHER555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  291. void _mmesa_write_span_mono_16_DITHER565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  292. void _mmesa_write_pixels_16_555(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  293. void _mmesa_write_pixels_16_565(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  294. void _mmesa_write_pixels_16_DITHER555(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  295. void _mmesa_write_pixels_16_DITHER565(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  296. void _mmesa_write_pixels_mono_16(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  297. void _mmesa_write_pixels_mono_16_DITHER555(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  298. void _mmesa_write_pixels_mono_16_DITHER565(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  299. void _mmesa_read_span_16_555(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  300. void _mmesa_read_span_16_565(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  301. void _mmesa_read_pixels_16_555(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  302. void _mmesa_read_pixels_16_565(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  303.  
  304. /* 24bpp rendering functions */
  305.  
  306. void _mmesa_write_span_24_RGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  307. void _mmesa_write_span_24_BGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  308. void _mmesa_write_span_rgb_24_RGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  309. void _mmesa_write_span_rgb_24_BGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgb[][3],GLubyte mask[]);
  310. void _mmesa_write_span_mono_24_RGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  311. void _mmesa_write_span_mono_24_BGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  312. void _mmesa_write_pixels_24_RGB(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  313. void _mmesa_write_pixels_24_BGR(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  314. void _mmesa_write_pixels_mono_24_RGB(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  315. void _mmesa_write_pixels_mono_24_BGR(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  316. void _mmesa_read_span_24_RGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  317. void _mmesa_read_span_24_BGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  318. void _mmesa_read_pixels_24_RGB(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  319. void _mmesa_read_pixels_24_BGR(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  320.  
  321. /* 32bpp rendering functions */
  322.  
  323. void _mmesa_write_span_32_ARGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  324. void _mmesa_write_span_32_ABGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  325. void _mmesa_write_span_32_RGBA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  326. void _mmesa_write_span_32_BGRA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4],GLubyte mask[]);
  327. void _mmesa_write_span_rgb_32_ARGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][3],GLubyte mask[]);
  328. void _mmesa_write_span_rgb_32_ABGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][3],GLubyte mask[]);
  329. void _mmesa_write_span_rgb_32_RGBA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][3],GLubyte mask[]);
  330. void _mmesa_write_span_rgb_32_BGRA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][3],GLubyte mask[]);
  331. void _mmesa_write_span_mono_32(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte mask[]);
  332. void _mmesa_write_pixels_32_ARGB(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  333. void _mmesa_write_pixels_32_ABGR(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  334. void _mmesa_write_pixels_32_RGBA(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  335. void _mmesa_write_pixels_32_BGRA(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  336. void _mmesa_write_pixels_mono_32(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte mask[]);
  337. void _mmesa_read_span_32_ARGB(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  338. void _mmesa_read_span_32_ABGR(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  339. void _mmesa_read_span_32_RGBA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  340. void _mmesa_read_span_32_BGRA(GLcontext *ctx,GLuint n,GLint x,GLint y,GLubyte rgba[][4]);
  341. void _mmesa_read_pixels_32_ARGB(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  342. void _mmesa_read_pixels_32_ABGR(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  343. void _mmesa_read_pixels_32_RGBA(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  344. void _mmesa_read_pixels_32_BGRA(GLcontext *ctx,GLuint n,GLint x[],GLint y[],GLubyte rgba[][4],GLubyte mask[]);
  345.  
  346. #endif    /* __MMESAP_H */
  347.  
  348.